package com.kmxd.ams.client.search;

import cn.hutool.core.lang.tree.Tree;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kmxd.ams.client.oss.vo.EfileRecordVO;
import com.kmxd.ams.client.search.dto.*;
import com.kmxd.ams.client.search.vo.*;
import com.kmxd.ams.core.oss.bo.OssFile;
import com.kmxd.ams.infra.arrange.base.SystemBO;
import com.kmxd.ams.infra.search.entity.DocumentEs;
import java.util.List;
import org.apache.commons.compress.utils.Lists;

/**
 * 检索
 *
 * @author nickbi
 */
public interface ISearchSvc {
  default Page archByCondition(SearchByConditionDTO req) {
    return null;
  }

  default List<Tree<String>> selectArchTree(SearchByKeywordsDTO req) {
    return null;
  }

  /**
   * 快速检索
   *
   * @param req
   * @return
   */
  default QuickSearchVO quickSearch(QuickSearchDTO req) {
    return null;
  }

  /**
   * 高级检索
   *
   * @param req
   * @return
   */
  default AdvancedSearchVO advancedSearch(AdvancedSearchDTO req) {
    return null;
  }

  /**
   * 卡片检索
   *
   * @param req
   * @return
   */
  default CardSearchVO cardSearch(CardSearchDTO req) {
    return null;
  }

  /**
   * 目录浏览
   *
   * @param req
   * @return
   */
  default CatalogSearchVO catalogSearch(CatalogSearchDTO req) {
    return null;
  }

  /**
   * 目录树
   *
   * @param req
   * @return
   */
  default List<Tree<String>> catalogTree(CatalogSearchTreeDTO req) {
    return null;
  }

  /**
   * 详情
   *
   * @param req
   * @return
   */
  default SearchViewVO view(SearchViewDTO req) {
    return null;
  }

  /**
   * 电子文件下载
   *
   * @param req
   * @return
   */
  default EfileRecordVO download(SearchFileDownloadDTO req) {
    return null;
  }

  /**
   * 文件下的电子文件打包下载
   *
   * @param req
   * @return
   */
  default OssFile downloadZip(SearchFileZipDownloadDTO req) {
    return null;
  }

  /**
   * 电子文件预览
   *
   * @param req
   * @return
   */
  default EfileRecordVO preview(SearchFilePreviewDTO req) {
    return null;
  }

  /**
   * 校验文档权限
   *
   * @param req
   * @return
   */
  default boolean checkAuth(SearchAuthCheckDTO req) {
    return false;
  }

  /**
   * 获取文档权限
   *
   * @param req
   * @return
   */
  default SearchAuthVO getAuth(SearchAuthQueryDTO req) {
    return null;
  }

  default List<DocumentEs> quickSearchData(QuickSearchExportDTO req) {
    return Lists.newArrayList();
  }

  default List<String> quickSearchExport(QuickSearchExportDTO req) {
    return Lists.newArrayList();
  }

  default List<? extends SystemBO> advancedSearchData(AdvancedSearchExportDTO req) {
    return Lists.newArrayList();
  }

  default List<String> advancedSearchExport(AdvancedSearchExportDTO req) {
    return Lists.newArrayList();
  }

  default List<? extends SystemBO> cardSearchData(CardSearchExportDTO req) {
    return Lists.newArrayList();
  }

  default List<String> cardSearchExport(CardSearchExportDTO req) {
    return Lists.newArrayList();
  }

  default List<? extends SystemBO> catalogSearchData(CatalogSearchExportDTO req) {
    return Lists.newArrayList();
  }

  default List<String> catalogSearchExport(CatalogSearchExportDTO req) {
    return Lists.newArrayList();
  }

  default List<SearchViewVO> list(SearchViewListQueryDTO req) {
    return Lists.newArrayList();
  }

  default List<String> exportList(SearchViewListQueryDTO req) {
    return Lists.newArrayList();
  }
}
